#include <iostream>

using namespace std;

void n_chars(char ch, int times);

int main(int argc, const char * argv[])
{
	int times;
	char ch;
	
	cout << "Enter a character:";
	cin >> ch;
	
	while(ch != 'q') {
		cout << "Enter a integer: ";
		cin >> times;
		n_chars(ch, times);
		cout << "\nEnter an another character or press q-key to quit:";
		cin >> ch;
	}
	return 0;
}

void n_chars(char ch, int times)
{
	while(times-- > 0) {
		cout << ch;
	}
}